package cn.platform.controller;

import cn.platform.response.AResponse;
import cn.platform.service.HarmonyActivityHomeworkService;
import cn.platform.service.HarmonyNoticeService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@CrossOrigin(maxAge = 3600) //允许跨域请求
@Controller
@RequestMapping("/api/harmony-notice")
public class HarmonyNoticeController {
    @Resource
    HarmonyNoticeService harmonyNoticeService;

    /**
     * 查询学校通知
     *
     * @return AResponse res 学校通知
     * @author jyz
     */
    @GetMapping("/get-notice")
    @ResponseBody
    public AResponse listNotice(){
        return harmonyNoticeService.getNotice();
    }
}
